-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repeat find char motion and fix a motion bug #891
Conversation
Can you also make it work for I mentioned this in the conversation above. |
I had added. |
Looks good! I think you need a |
ad0f96d
to
db59de4
Compare
fixed |
let n = match text.get_char(pos) { | ||
Some(next_ch) if next_ch == ch => n + 1, | ||
_ => n, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the bug here?
te|xt text
-> tx
-> te|xt text
instead of
te|xt text
-> tx
-> text te|xt
?
This is actually normal behavior in neovim/kakoune:
https://asciinema.org/a/mB7x2a1PguaIesmqLH5gBsSaV
I'm pressing tf
tf
tf
tf
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But maybe this is better. If I'm pressing tx
I probably don't want to match x
right after the cursor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cursor will not move with repeat motion.Personly most time I feel it is strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed 👍
Implement repeat find motion (find_till_char, find_next_char, extend_till_char, extend_next_char and pre {find,extend})
Fix a bug find till motion works unexpect when the next char of cursor equals searching char.
simplescreenrecorder1-2021-10-22_14.08.05.mp4